import request from "@/utils/request"
//获取用户频道列表
export const articles = params => request({
  // url: '/mp/v1_0/channels',
  url: "/v1_0/user/channels",
})
//获取文章列表
export const articlesList = params => request({
  // url: '/mp/v1_0/articles',
  url: "/v1_0/articles",
  params
})
//获取所有频道列表
export const allChannel = () => request({
  url: '/v1_0/channels'
})
//保存用户新增的频道
export const addChannel = channel => request({
  url: '/v1_0/user/channels',
  method: 'PATCH',
  data: {
    channels: [channel]
  }
})
//删除用户指定的频道
export const deleteChannel = targetId => request({
  url: `/v1_0/user/channels/${targetId}`,
  method: "DELETE"
})